<template>
  <div class="prevent">
    <template v-for="(item, index) in navs">
      <a href="#" :key="index">
        {{ item.name }}
      </a>
      <template v-if="index < navs.length - 1">/</template>
    </template>
  </div>
  <!-- 
    控制最后一个不显示 
    index: 0 1 2  

   -->
</template>
 
<script>
export default {
  props: ['navs'],
  data() {
    return {}
  }
}
</script>
 
<style lang = "less" scoped>
.prevent {
  margin: 10px 0;
  a {
    text-decoration: none;
  }
}
</style>